CC:=gcc

# gcc -Ixxx  告诉gcc编译代码解析include时的查找路径
log:=thirdparty/log/log.h thirdparty/log/log.c
log_test: test/log_test.c $(log)                        # log_test
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@


app_common:=app/app_common.h app/app_common.c
app_common_test: test/app_common_test.c $(app_common) $(log)   #app_common_test
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@


app_buffer:=app/app_buffer.h app/app_buffer.c
app_buffer_test: test/app_buffer_test.c $(app_buffer) $(log)   #app_buffer_test
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@


cJSON:=thirdparty/cJSON/cJSON.h thirdparty/cJSON/cJSON.c
cJSON_test: test/cJSON_test.c $(cJSON) $(log)                        # cJSON_test
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@